/* 输入框 */
.bny-input,
.bny-textarea {
    border: 2px solid var(--primary);
    display: block;
    width: 100%;
    padding-left: 10px;
    background-color: var(--white);
    color: var(--black);
    border-radius: var(--border-radius);
    height: 38px;
    line-height: 1.3;
    transition: var(--transition);
    /* box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.3); */
}

.bny-input:focus,
.bny-textarea:focus,
.bny-select:focus {
    border-color: var(--success-40);
    /* box-shadow: var(--box-shadow);
    transform: var(--transform-3d-010);
    box-shadow: var(--box-shadow-hover); */
}

.bny-input::placeholder,
.bny-textarea::placeholder {
    color: var(--muted);
}

.bny-textarea {
    position: relative;
    min-height: 100px;
    height: auto;
    line-height: 20px;
    padding: 6px 10px;
    resize: vertical;
}

.bny-input-group {
    position: relative;
    display: flex;
    border-collapse: separate;
    align-items: center;
}

.bny-input-group .intersp {
    border: 2px solid var(--primary);
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.bny-input-group .intersp:hover {
    cursor: pointer;
}

.bny-input-group .intersp:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.bny-input-group input:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right-width: 0;
}

.bny-input-group .intersp~input {
    border-left-width: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.bny-input-group input~.intersp {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.bny-form-group {
    margin-bottom: 15px;
    clear: both;
}

.bny-form-group label:first-child {
    display: flex;
    padding: 9px 15px;
    margin-bottom: 5px;
    padding-left: 0px;
    font-weight: 400;
    line-height: 20px;
    flex-wrap: nowrap;
    align-items: center;
    color: var(--primary);
}

.bny-form-group label:first-child::before {
    content: "";
    height: 20px;
    background-color: var(--primary);
    display: inline-block;
    border: 2px solid var(--primary);
    margin-right: 5px;
    border-radius: 10px;
}

.bny-form-inline {
    margin-bottom: 15px;
    clear: both;
    display: flex;
    align-items: flex-start;
}

.bny-form-inline label:first-child {
    position: relative;
    padding: 9px 15px;
    width: 110px;
    min-width: 110px;
    font-weight: 400;
    line-height: 20px;
    text-align: right;
    color: var(--primary);
}

.bny-form-pane {
    margin-bottom: 15px;
    clear: both;
    display: flex;
    align-items: flex-start;
}

.bny-form-pane label:first-child {
    position: relative;
    padding: 7px 5px;
    width: 110px;
    min-width: 110px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
    border: 2px solid var(--primary);
    border-right-width: 1px;
    border-radius: var(--border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    background-color: var(--muted-40);
    color: var(--primary);
}

.bny-form-pane .bny-input {
    border-left-width: 1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.bny-form-text {
    margin-bottom: 15px;
    clear: both;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.bny-form-text label:first-child {
    position: relative;
    width: 100%;
    padding: 7px 15px;
    font-weight: 400;
    line-height: 20px;
    box-sizing: border-box;
    border: 2px solid var(--primary);
    border-radius: var(--border-radius);
    background-color: var(--muted-40);
    color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-width: 1px;
}

.bny-form-text .bny-textarea {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top-width: 1px;
}

[disabled].bny-input,
[disabled].bny-textarea {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 选择框 */
.bny-select {
    display: block;
    width: 100%;
    border: 2px solid var(--primary);
    color: var(--primary);
    background-color: var(--white);
    border-radius: var(--border-radius);
    height: 38px;
    line-height: 1.3;
    padding-left: 10px;
    padding-right: 10px;
    transition: var(--transition);
    /* box-shadow: var(--box-shadow); */
}

.bny-form-pane .bny-select:checked {
    border-left-width: 1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.bny-form-pane .bny-select {
    border-left-width: 1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[disabled].bny-select {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 单选框 */
.bny-radio {
    height: 38px;
    padding: 0 10px;
    font-weight: 400;
    line-height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.bny-form-pane .bny-radio {
    border: 2px solid var(--primary);
    border-left-width: 0;
    border-right-width: 0;
}

.bny-radio span:hover {
    cursor: pointer;
}

.bny-radio:hover>span::before {
    cursor: pointer;
    border-color: var(--success-10);

}

.bny-radio:active>span::before {
    transform: var(--transform-3d-010);
    box-shadow: var(--box-shadow-hover);
}

.bny-radio input[type="radio"] {
    display: none;
}

.bny-radio span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bny-radio>span::before {
    content: "";
    border: 2px solid var(--primary);
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    margin-right: 5px;
    display: inline-block;
    padding: 1px;
    box-sizing: border-box;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.bny-radio input[type="radio"]:checked+span::before {
    background-color: var(--muted);
}

.bny-form-pane label+.bny-radio {
    border-left-width: 0px;
}

.bny-form-pane .bny-radio:nth-child(2) {
    border-left-width: 1px;
}

.bny-form-pane .bny-radio:last-child {
    border-left-width: 0;
    border-right-width: 2px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.bny-radio input[type="radio"][disabled]+span,
.bny-radio input[type="radio"][disabled]+span::before {
    cursor: not-allowed;
    opacity: 0.5;
}

/* 多选框 */
.bny-checkbox {
    display: inline-flex;
    height: 38px;
    align-items: center;
    justify-content: center;
    line-height: 20px;
    padding: 0 10px;
    color: var(--primary);
}

.bny-checkbox:hover {
    cursor: pointer;
}

.bny-checkbox input[type="checkbox"] {
    display: none;
}

.bny-checkbox>span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bny-checkbox>span::before {
    content: "";
    border: 2px solid var(--primary);
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    margin-right: 5px;
    border-radius: var(--border-radius);
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
}

.bny-checkbox:hover>span::before {
    border-color: var(--success-10);
}

.bny-form-pane .bny-checkbox {
    border: 2px solid var(--primary);
    border-left-width: 0;
    border-right-width: 0;
}

.bny-checkbox input[type="checkbox"]:checked+span::before {
    /* content: "√"; */
    background-color: var(--muted);
}

.bny-form-pane .bny-checkbox:nth-child(2) {
    border-left-width: 1px;
}

.bny-form-pane .bny-checkbox:last-child {
    border-left-width: 0;
    border-right-width: 2px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* 开关 */
.bny-switch {
    display: inline-flex;
    height: 38px;
    align-items: center;
    /* justify-content: center; */
    line-height: 20px;
    padding: 0 10px;
    line-height: 38px;
}

.bny-switch:hover {
    cursor: pointer;
}

.bny-switch>input {
    display: none;
}

.bny-switch>.bny-switch-slider {
    display: inline-flex;
    width: 56px;
    height: 24px;
    border-radius: var(--border-radius);
    border: 2px solid var(--primary);
    border-radius: 20px;
    align-items: center;
    position: relative;
}

.bny-switch>.bny-switch-slider::before {
    content: "";
    width: 16px;
    height: 16px;
    background-color: var(--muted);
    box-sizing: border-box;
    border-radius: 50%;
    margin: 0 2px;
    transition: var(--transition);
}

.bny-switch>.bny-switch-slider>span {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 14px;
    padding: 0 4px;
}

.bny-switch>.bny-switch-slider>span:first-child {
    display: none;
}

.bny-switch>input[type="checkbox"]:checked+.bny-switch-slider {
    background-color: var(--muted);
}

.bny-switch>input[type="checkbox"]:checked+.bny-switch-slider>span:first-child {
    display: flex;
    justify-content: flex-start;
    color: var(--white);
}

.bny-switch>input[type="checkbox"]:checked+.bny-switch-slider>span:last-child {
    display: none;
}

.bny-switch>input[type="checkbox"]:checked+.bny-switch-slider::before {
    transform: translateX(32px);
    background-color: var(--white);
}

.bny-form-pane label:nth-child(2) {
    border-left: 1px solid var(--primary);
}